package com.rimi.util;
import com.rimi.bean.YqzcUser;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;


/**
 * 获取用户id
 */
public class UserIdUtil {

    public static Integer getUserId(){

        Subject subject = SecurityUtils.getSubject();

        YqzcUser yqzcUser = (YqzcUser) subject.getPrincipal();

        return yqzcUser.getUserId();
    }
}
